﻿using DevComponents.AdvTree;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Construction.Core
{
    public class cObj
    {
        private string baseID;
        public cObj()
        {
            this.baseID = Guid.NewGuid().ToString();
            this.node = new Node();
        }
        public string BaseID
        {
            set
            {
                this.baseID = value;
                if (this.node != null)
                {
                    this.node.Name = this.baseID;
                }
            }
            get
            {
                return this.baseID;                
            }
        }

        public virtual void Add(cObj obj)
        {

        }
        public virtual void Add(cObj obj, int index)
        {

        }
        public Node node { set; get; }
        public string OwnerID { set; get; }
        public string Name { set; get; }
    }
}
